<html>
<head><meta charset="utf-8"><title>status badges in search results · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/status.20badges.20in.20search.20results.html">status badges in search results</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236983138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/status%20badges%20in%20search%20results/near/236983138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/status.20badges.20in.20search.20results.html#236983138">(May 01 2021 at 16:59)</a>:</h4>
<p>I want to take the "deprecated" and "experimental" badges that appear on items in the module-level docs and cause them to show up in search results. having never touched rustdoc before, I assume that I'll first have to add a new item-level field to the JSON search index, then populate this field from whatever parsed representation already detects deprecated/experimental status, then update the search results page to use this field. Does that sound accurate? Would anyone like to point me to the right files to get started with?</p>



<a name="236983326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/status%20badges%20in%20search%20results/near/236983326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/status.20badges.20in.20search.20results.html#236983326">(May 01 2021 at 17:01)</a>:</h4>
<p><span class="user-mention" data-user-id="256342">@bstrie</span> do you happen to know a deprecated function in libstd I could use to test the current behavior?</p>



<a name="236983349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/status%20badges%20in%20search%20results/near/236983349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/status.20badges.20in.20search.20results.html#236983349">(May 01 2021 at 17:01)</a>:</h4>
<p><code>try!</code> works</p>



<a name="236983391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/status%20badges%20in%20search%20results/near/236983391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/status.20badges.20in.20search.20results.html#236983391">(May 01 2021 at 17:02)</a>:</h4>
<p>I don't know much about search but most of the logic is in <a href="https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/search.js">https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/search.js</a> I believe</p>



<a name="236983439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/status%20badges%20in%20search%20results/near/236983439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/status.20badges.20in.20search.20results.html#236983439">(May 01 2021 at 17:02)</a>:</h4>
<p>the case that I particularly care about is <a href="https://doc.rust-lang.org/std/index.html?search=max">https://doc.rust-lang.org/std/index.html?search=max</a> ; the <code>std::*::MAX</code> consts are all deprecated, whereas <code>*::MAX</code> are their replacements</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>